﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DevExpress.Web.ASPxGridView;
using DevExpress.Data;

public partial class Top_Manager_TP_Sales : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Session["current"] = "Sales";//current page
        if (Session["user"] != null)//check user
        {
            string user = Session["user"].ToString();
            if (user == "viewer")
            {
                Response.Redirect("index.aspx");
            }

        }
        else
        {
            Response.Redirect("index.aspx");
        }

        if (IsPostBack)
        {
            ASPxSummaryItem totalSummary = new ASPxSummaryItem();
            totalSummary.FieldName = "Total_Price";
            totalSummary.ShowInColumn = "Total_Price";
            totalSummary.SummaryType = SummaryItemType.Sum;
            totalSummary.DisplayFormat = "Total Rs.{0}";
            ASPxGridView1.TotalSummary.Add(totalSummary);
        }
        
    }
}